import { legacy_createStore as createStore } from "redux";
function mesReducer(state = { mes: "hello" }, action) {
  // 具体修改数据的行为
  switch (action.type) {
    case "changeMes":
      return Object.assign({}, state, { mes: action.payload });
    case "resetMes":
      return Object.assign({}, state, { mes: "hello" });
    default:
      return state;
  }
}

let store = createStore(mesReducer);
export default store;
